package com.powersystem.demo.controller;


import com.powersystem.demo.entity.PsPoleInfo;
import com.powersystem.demo.mapper.PsPoleInfoMapper;
import com.powersystem.demo.service.IPsPoleInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@RestController
public class PsPoleInfoController {
    
    @Autowired
    private IPsPoleInfoService ifls;

    //插入一條記錄
    @RequestMapping("addPsPoleInfo")
    public boolean addPsPoleInfo(PsPoleInfo fl){
        return ifls.save(fl);
    }

    // 根據ID修改是否啓動
    @RequestMapping("upPsPoleInfo")
    public boolean upPsPoleInfo(PsPoleInfo fl){
        return ifls.updateById(fl);
    }

    // 根據ID刪除
    @RequestMapping("delePsPoleInfo")
    public boolean delePsPoleInfo(int id){
        return ifls.removeById(id);
    }
}

